﻿CREATE PROCEDURE temp.s_JobTest AS

BEGIN TRAN
EXECUTE AS Login='AFC-HOME\SQLServer'
EXEC s_PromisesToPay_Update
REVERT
ROLLBACK

declare @UN sysname SET @UN = dbo.UserName()
DECLARE @G sysname
SELECT  @G = GroupName
FROM         UserGroups()

RAISERROR('UN:%s,Group:%s.',16,1,@UN,@G)
